package com.java.date;

import java.time.*;

public class LocalDateTimeTest {
    public static void main(String[] args) {
        LocalDateTime today = LocalDateTime.now();
        System.out.println("Current DateTime = " + today);

        today = LocalDateTime.of(LocalDate.now(), LocalTime.now());
        System.out.println("Current DateTime = " + today);

        LocalDateTime specificDate = LocalDateTime.of(2014, Month.APRIL, 1, 10, 12, 32, 13);

        LocalDateTime todaySH = LocalDateTime.now(ZoneId.of("Asia/Shanghai"));

        LocalDateTime dateFromBase = LocalDateTime.ofEpochSecond(10000,0, ZoneOffset.UTC);
        System.out.println("10000th second time from 1970-01-01 = " + dateFromBase);
    }
}
